package com.example.flasksale.controller;

import com.example.flasksale.dao.OrderDao;
import com.example.flasksale.entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/test")
public class TestController {

    @Autowired
    private OrderDao orderDao;

    @ResponseBody
    @RequestMapping("/insert-one")
    public String insertOne() {
        orderDao.insertOne(new Order());
        return "succ";
    }
}
